import request from '@/utils/request'

// 查询业务_政策列表
export function listPolicy(query) {
  return request({
    url: '/bussiness/policy/list',
    method: 'get',
    params: query
  })
}

// 查询业务_政策详细
export function getPolicy(policyId) {
  return request({
    url: '/bussiness/policy/' + policyId,
    method: 'get'
  })
}

// 新增业务_政策
export function addPolicy(data) {
  return request({
    url: '/bussiness/policy',
    method: 'post',
    data: data
  })
}

// 修改业务_政策
export function updatePolicy(data) {
  return request({
    url: '/bussiness/policy',
    method: 'put',
    data: data
  })
}

// 删除业务_政策
export function delPolicy(policyId) {
  return request({
    url: '/bussiness/policy/' + policyId,
    method: 'delete'
  })
}

//上移 下移
export function moveUpOrDown(data) {
  return request({
    url: '/bussiness/policy/moveUpOrDown',
    method: 'put',
    data
  })
}

//置顶 置底
export function pinToTopOrEnd(data) {
  return request({
    url: '/bussiness/policy/pinToTopOrEnd',
    method: 'put',
    data
  })
}
